/**
 * 两个字符串A和B，字符用空格隔开，统计这2个字符串中由唯一性的字符
 */
let A = "this apple is sweet"
let B = "this apple is sour"

uncommonFromSentences(A, B)

var uncommonFromSentences = function(A, B) {
    let arr = A.split(' ').concat(B.split(' '))
    // console.log(arr)
    let res = []
    arr.map((i) => {
        // console.log(i)
        let num = 0
        for(let item of arr){
            if(item === i){
               num++
            }
        }
        // console.log(i, num)
        if(num === 1){
           res.push(i)
        }
    })
    // console.log(res)
    return res
};